package valoskmdev.bean;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.InheritanceStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public class ModelBase implements Serializable {

	private static final long serialVersionUID = -8746854817757746382L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent	
	private User user;
	@Persistent
	private Date timeCreated;
	@Persistent	
	@Extension(vendorName = "datanucleus", key = "gae.unindexed", value = "true")
	private User userLastModified;
	@Persistent
	private Date timeLastModified;
	@Persistent	
	private Boolean isDisabled;
	@Persistent
	private String description;

	public Long getId() {
		return this.id;
	}

	public void setId(final Long id) {
		this.id = id;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(final User user) {
		this.user = user;
	}

	public Date getTimeCreated() {
		return this.timeCreated;
	}

	public void setTimeCreated(final Date timeCreated) {
		this.timeCreated = timeCreated;
	}

	public User getUserLastModified() {
		return this.userLastModified;
	}

	public void setUserLastModified(final User userLastModified) {
		this.userLastModified = userLastModified;
	}

	public Date getTimeLastModified() {
		return this.timeLastModified;
	}

	public void setTimeLastModified(final Date timeLastModified) {
		this.timeLastModified = timeLastModified;
	}

	public Boolean isDisabled() {
		return this.isDisabled;
	}

	public Boolean getDisabled() {
		return this.isDisabled;
	}

	public void setDisabled(final Boolean isDisabled) {
		this.isDisabled = isDisabled;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(final String description) {
		this.description = description;
	}

}